<template>
    <div class="wrapper">
        <mt-header title="个人信息" class="no-bg">
            <mt-button icon="back" slot="left" @click="$router.push('/account')"></mt-button>
        </mt-header>
        <div class="list">
            <mt-cell title="头像" is-link  @click.native="$router.push('/account/myInfo/editHeadImg')">
                <span>
                    <img v-if="userInfo && userInfo.photo" :src="userInfo && userInfo.photo" width="45" height="45" class="headImg">
                    <img v-else src="http://47.75.99.213/app/cdn/default-headImg.png" width="45" height="45" class="headImg">
                </span>
            </mt-cell>
            <mt-cell title="昵称" is-link @click.native="$router.push('/account/myInfo/editNickname')">
                <span>{{userInfo && userInfo.name}}</span>
            </mt-cell>
        </div>
    </div>
</template>

<script>
import { mapGetters } from 'vuex'
export default {
    data() {
        return {
            
        };
    },
    computed: {
        ...mapGetters([
            'userInfo'
        ])
    }
};
</script>

<style lang="stylus" scoped>
.wrapper{
    .list{
        padding-top:10px;
        .headImg{
            width:45px;
            height:45px;
            border-radius:50%;
        }
    }
}
</style>